package com.stu.service.impl;

import cn.hutool.core.util.StrUtil;
import com.stu.dao.ClassMapper;
import com.stu.po.Class;
import com.stu.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassServiceImpl implements ClassService {
    @Autowired
    private ClassMapper classMapper;

    @Override
    public Integer ClassByName(String className, Integer majorId) {
        if (StrUtil.isBlank(className) || majorId==null) {
            return null;
        }
        return classMapper.classByName(className, majorId);
    }

    @Override
    public List<Class> classList() {

        return classMapper.classList();
    }
}
